home *** CD-ROM | disk | FTP | other *** search
/ Digitální fotografie a video / Digitalni-fotografie-a-video-covermount.bin / Aplikace / Servis / Katalog / Katalog.dxr / 00053_New Behavior.ls < prev    next >
Encoding:
Text File  |  1998-05-19  |  1.5 KB  |  58 lines

  1. property Smer, Tlacitko
  2.  
  3. on getPropertyDescriptionList
  4.   set description to [:]
  5.   addProp(description, #Smer, [#comment: "Smer:", #format: #string, #default: EMPTY])
  6.   return description
  7. end
  8.  
  9. on getBehaviorDescription
  10.   return "N├íjezd a klik"
  11. end
  12.  
  13. on beginSprite me
  14.   set the visible of sprite the spriteNum of me to 1
  15.   set the visible of sprite (the spriteNum of me + 1) to 0
  16. end
  17.  
  18. on endSprite me
  19. end
  20.  
  21. on mouseEnter me
  22.   puppetSound(1, "Najezd")
  23.   set the cursor of sprite the spriteNum of me to [member "ruka_1", member "ruka_2"]
  24.   set the visible of sprite (the spriteNum of me + 1) to 1
  25.   set Tlacitko to the castNum of sprite (the spriteNum of me + 1)
  26. end
  27.  
  28. on mouseLeave me
  29.   set the visible of sprite (the spriteNum of me + 1) to 0
  30.   set the cursor of sprite the spriteNum of me to -1
  31.   set the member of sprite (the spriteNum of me + 1) to member Tlacitko
  32. end
  33.  
  34. on mouseDown me
  35.   puppetSound(1, "Klik")
  36.   set the member of sprite (the spriteNum of me + 1) to member (Tlacitko + 1)
  37. end
  38.  
  39. on mouseUp me
  40.   global Pozice, AutoShow
  41.   set AutoShow to 0
  42.   if Tlacitko > 0 then
  43.     set the member of sprite (the spriteNum of me + 1) to member Tlacitko
  44.   end if
  45.   if Smer = "Zpet" then
  46.     set Pozice to Pozice - 1
  47.     if Pozice = 1 then
  48.       set Pozice to 2
  49.     end if
  50.   else
  51.     set Pozice to Pozice + 1
  52.     if Pozice >= (the number of lines in the labelList - 1) then
  53.       set Pozice to the number of lines in the labelList - 1
  54.     end if
  55.   end if
  56.   go(label(line Pozice of the labelList))
  57. end
  58.